<?php

declare(strict_types=1);

namespace app\common\model\Order;

use think\Model;
use think\model\concern\SoftDelete;

/**
 * @mixin \think\Model
 */
class Product extends Model
{

    protected $table = 'pre_order_product';

    use SoftDelete;

    // 软删除字段
    protected $deleteTime = 'deletetime';
    
    public function order()
    {
        return $this->belongsTo('app\common\model\Order\Order', 'orderid', 'id');
    }
    
    public function products()
    {
        return $this->belongsTo('app\common\model\Product\Product', 'proid', 'id');
    }
}
